Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce test time for TensorRT EP CI #10408

Merged
merged 26 commits into from
Feb 1, 2022
Merged

Reduce test time for TensorRT EP CI #10408

merged 26 commits into from
Feb 1, 2022

Conversation

chilo-ms
Copy link
Contributor

@chilo-ms chilo-ms commented Jan 27, 2022

When updating to TRT 8.2, some tests require longer time to finish because new algorithms are added in TRT.
Following three modifications which are made specific to TRT EP CI can help reduce CI time by ~25 min on both Windows/Linux:

  • Only run TRT ep for model tests and exclude all other eps.
  • Only run TRT ep for unit tests.
  • Reduction op test takes much longer time for TRT 8.2, so we test smaller range of inputs for TRT EP.

@@ -682,13 +682,19 @@ if (onnxruntime_BUILD_WEBASSEMBLY)
endif()
endif()

set(test_all_args)
if (onnxruntime_USE_TENSORRT)
list(APPEND test_all_args "--gtest_filter=-*cpu__*:*cuda__*" )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment on what we want to exclude here would be helpful.

Copy link
Contributor Author

@chilo-ms chilo-ms Jan 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments are added here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know where the "cpu__" and "cuda__" in the test names come from - I didn't see them in the code. Explaining that would be helpful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made the comment more clear.

# The test names of model tests were using sequential number in the past.
# This PR https://github.com/microsoft/onnxruntime/pull/10220 (Please see ExpandModelName function in model_tests.cc for more details) 
# made test name contain the "ep" and "model path" information, so we can easily filter the tests using cuda ep or other ep with *cpu__* or *xxx__*.  

@@ -1168,8 +1175,12 @@ void OpTester::Run(
cur_provider = "not set";
}

#ifdef USE_TENSORRT
ORT_UNUSED_PARAMETER(has_run);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a comment here to explain this case here.
we are allowing tests to be run with only TensorRT EP, but TensorRT EP may not support all tests and may be in excluded providers list.

jywu-msft
jywu-msft previously approved these changes Jan 30, 2022
@chilo-ms chilo-ms merged commit a7c6786 into master Feb 1, 2022
@chilo-ms chilo-ms deleted the update_trt_ci branch February 1, 2022 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants